using UnityEngine;

namespace TMPAnimationLib
{
    public static class Util
    {
        public static float Lerp_Float(float a, float b, float t)
        {
            return (b - a) * t + a;
        }

        public static Vector3 Lerp_Vec3(Vector3 a, Vector3 b, float t)
        {
            return new Vector3(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t);
        }

        public static Vector2 Lerp_Vec2(Vector2 a, Vector2 b, float t)
        {
            return new Vector2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
        }
    }
}